/* 
 * JUGJobs -- A Jobs Posting Application for Java Users Groups and Other Groups
 * $Id: AdminLoginForm.java,v 1.3 2005/12/16 04:53:37 biglee Exp $
 * 
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is the JUGJobs project.
 *
 * The Initial Developers of the Original Code are the members of the Triangle
 * Java User's Group in the RTP area of North Carolina.
 * Portions created by the Initial Developer are Copyright (C) 2005
 * the Initial Developers. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** 
 */
package org.jugjobs.form;

import javax.servlet.http.*;
import org.apache.struts.action.ActionMapping;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;

/**
 * @author BigLee
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class AdminLoginForm extends ActionForm {
    private String j_username;
    private String j_password;
    
    public String getJ_username() { return (j_username); }

      public void setJ_username(String s) { j_username = s; }
    
    public String getJ_password() { return (j_password); }

      public void setJ_password(String s) { j_password = s; }
      
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
    {	ActionErrors errors = new ActionErrors();
    	if (   j_username == null || j_username.length() < 1
    		|| j_password == null || j_password.length() < 1)
    	{
    		errors.add("blanks", new ActionError("jugjobs.admin.text.blankfields"));
    	}
    	return errors;
    }
}
